package com.itheima.enumdemo;

import java.util.TreeSet;

public class Demo02 {

    public static void main(String[] args) {
        TreeSet<Season> set= new TreeSet<>();
        set.add(Season.WINTER);
        set.add(Season.WINTER);
        set.add(Season.AUTUMN);
        set.add(Season.SPRING);
        set.add(Season.SUMMER);
        System.out.println(set);

        Season spring = Season.SPRING;
        Season spring1 = Enum.valueOf(Season.class, "SPRING");
        System.out.println(spring==spring1);


        Season[] values = Season.values();
        for (Season value : values) {
            System.out.println(value);
        }

    }
}
